package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.domain.entity.InviteRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 参数配置 数据层
 *
 * @author ruoyi
 */
@Mapper
public interface InviteRecordMapper extends BaseMapper<InviteRecord> {
    int insert(InviteRecord inviteRecord);
    InviteRecord selectByInviteeId(@Param("inviteeId") Long inviteeId);
    List<Long> selectInviteeIdsByInviterId(Long inviterId);
    Integer selectTeamSize(@Param("parentInviterId") Long parentInviterId,@Param("beginLevel") Long beginLevel,@Param("endLevel") Long endLevel);
    List<InviteRecord> selectTeamSizeByInviterId(@Param("inviterId") Long inviterId,@Param("level") Integer level);
    Integer getLevelByInviteeId(@Param("inviteeId") Long inviteeId);
    Long selectMyRecommend(@Param("inviteCode") String inviteCode);
}
